﻿//告诉Ember.js，当应用的URL与 '/' 匹配时，渲染 App 模板。
App.Router.map(function () {
    this.resource('App', { path: '/' }, function () {
        // 其他子路由
        
    });
    this.resource('Row', { path: '/Row' }, function () {
        // 其他子路由
        //this.route('active');
        //this.route('completed');
        this.resource('Cell', { path: '/Cell' }, function () {
        });
    });
});

App.AppRoute = Ember.Route.extend({
    model: function () {
        return {
            columns: [''],
            rows:['']
        };
    }
});

App.AppIndexRoute = Ember.Route.extend({
    model: function () {
        return null;
    }
});

App.RowRoute = Ember.Route.extend({
    model: function () {
        alert(1)
        return App.Row.find();
    }
});

App.RowIndexRoute = Ember.Route.extend({
    model: function () {
        alert(1)
        return App.Row.find();
    }
});

App.CellRoute = Ember.Route.extend({
    model: function () {
        return App.Cell.find();
    }
});